#include("/view/include/list.html")
#@layout()

#define main()
	<fieldset class="table-search-fieldset">
	<legend>查询SQL</legend>
	<div style="margin: 10px 10px 10px 10px">
		<form class="layui-form layui-form-pane" action="" id="searchForm"
			lay-filter="searchForm" method="post">
			<div class="layui-form-item">
		        <div class="layui-input-block">
		            <textarea  cols="100" rows="3" name="sql" lay-filter="sql" placeholder="请输入查询SQL"
		 				class="layui-textarea" id="sql" disable>#(vo.sqls)</textarea>  
		 		</div>
		    </div>
			<div class="layui-form-item">
				<div class="layui-inline">
					<label class="layui-form-label">条件一</label>
					<div class="layui-input-inline">
						<input type="text" name="cond1" autocomplete="off" class="layui-input" placeholder="key = value">
					</div>
				</div>
				<div class="layui-inline">
					<label class="layui-form-label">条件二</label>
					<div class="layui-input-inline">
						<input type="text" name="cond2" autocomplete="off" class="layui-input" placeholder="key > value">
					</div>
				</div>
				<div class="layui-inline">
					<label class="layui-form-label">条件三</label>
					<div class="layui-input-inline">
						<input type="text" name="cond3" autocomplete="off" class="layui-input" placeholder="key like value">
					</div>
				</div>
			</div>
			<div class="layui-form-item">
				<div class="layui-inline">
					<button type="submit" class="layui-btn layui-btn-primary"
						lay-submit>
						<i class="layui-icon"></i> 查询
					</button>
      				<button type="reset" class="layui-btn layui-btn-primary">清空</button>
				</div>
			</div>
		</form>
	</div>
</fieldset>

#end

#define script()
<script>
    layui.use(['table'], function () {
        var $ = layui.jquery,
        	table = layui.table,
            layuimini = layui.layuimini;
        #if(data != null)
        var listTable = table.render({
            elem: '#listTable',
            defaultToolbar: ['filter', 'exports', 'print', {
                title: '提示',
                layEvent: 'LAYTABLE_TIPS',
                icon: 'layui-icon-tips'
            }],
            cols: [[
                {type: "numbers", width: 50, fixed: "left", title: '行'}
                #for(col : cols)
                ,{field: '#(col)', title: '#(col)'}
                #end
            ]],
            data:#(data)
        });
        #end
    });      
</script>
#end